Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

Q is empty.

Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

SORT1(cons2(x, y)) -> INSERT2(x, sort1(y))
INSERT2(x, cons2(v, w)) -> CHOOSE4(x, cons2(v, w), x, v)
CHOOSE4(x, cons2(v, w), s1(y), s1(z)) -> CHOOSE4(x, cons2(v, w), y, z)
CHOOSE4(x, cons2(v, w), 0, s1(z)) -> INSERT2(x, w)
SORT1(cons2(x, y)) -> SORT1(y)

The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

SORT1(cons2(x, y)) -> INSERT2(x, sort1(y))
INSERT2(x, cons2(v, w)) -> CHOOSE4(x, cons2(v, w), x, v)
CHOOSE4(x, cons2(v, w), s1(y), s1(z)) -> CHOOSE4(x, cons2(v, w), y, z)
CHOOSE4(x, cons2(v, w), 0, s1(z)) -> INSERT2(x, w)
SORT1(cons2(x, y)) -> SORT1(y)

The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 2 SCCs with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

INSERT2(x, cons2(v, w)) -> CHOOSE4(x, cons2(v, w), x, v)
CHOOSE4(x, cons2(v, w), s1(y), s1(z)) -> CHOOSE4(x, cons2(v, w), y, z)
CHOOSE4(x, cons2(v, w), 0, s1(z)) -> INSERT2(x, w)

The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


CHOOSE4(x, cons2(v, w), s1(y), s1(z)) -> CHOOSE4(x, cons2(v, w), y, z)
The remaining pairs can at least be oriented weakly.

INSERT2(x, cons2(v, w)) -> CHOOSE4(x, cons2(v, w), x, v)
CHOOSE4(x, cons2(v, w), 0, s1(z)) -> INSERT2(x, w)
Used ordering: Polynomial interpretation [21]:

POL(0) = 0   
POL(CHOOSE4(x1, x2, x3, x4)) = x1 + x1·x2 + x1·x4 + x3   
POL(INSERT2(x1, x2)) = 2·x1 + 2·x1·x2   
POL(cons2(x1, x2)) = 2·x1 + 2·x2   
POL(s1(x1)) = 1 + 2·x1   

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

INSERT2(x, cons2(v, w)) -> CHOOSE4(x, cons2(v, w), x, v)
CHOOSE4(x, cons2(v, w), 0, s1(z)) -> INSERT2(x, w)

The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


CHOOSE4(x, cons2(v, w), 0, s1(z)) -> INSERT2(x, w)
The remaining pairs can at least be oriented weakly.

INSERT2(x, cons2(v, w)) -> CHOOSE4(x, cons2(v, w), x, v)
Used ordering: Polynomial interpretation [21]:

POL(0) = 2   
POL(CHOOSE4(x1, x2, x3, x4)) = x1 + x1·x2 + x1·x4 + x3   
POL(INSERT2(x1, x2)) = 2·x1 + 2·x1·x2   
POL(cons2(x1, x2)) = 2·x1 + 2·x2   
POL(s1(x1)) = 1   

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ DependencyGraphProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

INSERT2(x, cons2(v, w)) -> CHOOSE4(x, cons2(v, w), x, v)

The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 0 SCCs with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

SORT1(cons2(x, y)) -> SORT1(y)

The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


SORT1(cons2(x, y)) -> SORT1(y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [21]:

POL(SORT1(x1)) = 2·x12   
POL(cons2(x1, x2)) = 2 + 2·x2   

The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

sort1(nil) -> nil
sort1(cons2(x, y)) -> insert2(x, sort1(y))
insert2(x, nil) -> cons2(x, nil)
insert2(x, cons2(v, w)) -> choose4(x, cons2(v, w), x, v)
choose4(x, cons2(v, w), y, 0) -> cons2(x, cons2(v, w))
choose4(x, cons2(v, w), 0, s1(z)) -> cons2(v, insert2(x, w))
choose4(x, cons2(v, w), s1(y), s1(z)) -> choose4(x, cons2(v, w), y, z)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.